<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBindexC "-//W3C//DTD HTML 4.01 Transitional//EN" 
    "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>客户信息</title>
</head>
<body>



		<table border="1">
		<tr >
			<td>id</td>
			<td>name</td>
			<td>job</td>
			<td>phone</td>
		</tr>
		
				
				<%-- <c:forEach items="${customer}" var="dept">
    			<%=pageContext.getAttribute("dept.get()")%>
   				 <br/>
				</c:forEach> --%>
				
				<c:forEach var="i" begin="0" end="${customer.size()-1}">
  				  <tr>
                 		<td>
                 		${customer[i].id}
                 		</td>
                 		<td>
                 		${customer[i].name}
                 		</td>
                 		<td>
                 		${customer[i].job}
                 		</td>
                 		<td>
                 		${customer[i].phone}
                 		</td>
                      </tr>
				</c:forEach>

		<%-- <%
                
                    for(int i=0;i<13;i++){
                    	pageContext.setAttribute("index", i);
                 %>
                 
                         <tr>
                 		<td>
                 		${customer[index].id}
                 		</td>
                 		<td>
                 		${customer[index].name}
                 		</td>
                 		<td>
                 		${customer[index].job}
                 		</td>
                 		<td>
                 		${customer[index].phone}
                 		</td>
                 		
                  
                      </tr>
                  <%     
                    }
                %> --%>
             </table>
             

	
	
	<input type="button" value="刷新" onclick="location.reload()"/>
	
	<form action="${pageContext.request.contextPath }/fileupload"
		method="post" enctype="multipart/form-data" onsubmit="return check()">

		请选择文件：<input type="file" name="file" id="file" multiple="multiple" /><br>
		<input type="submit" value="提交" /><br>
	</form>
	
	
</body>
<script>
function check(){
    var file = document.getElementById("file").value;
    if(file.length==0||file==""){
        alert("请选择上传文件");
        return false;
    }
    return true;
}
</script>
  
</html>
